package com.gxa.web_admin.controller.lx;

import com.gxa.common.vo.R2;
import com.gxa.modules.service.lx.GoodsService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Controller
@Api(value = "商品查询",tags = "选品中心")
@RequestMapping("/goods")
public class GoodsController {
    @Autowired
    private GoodsService goodsService;

    @RequestMapping(value = "/queryGoodsList",method = RequestMethod.POST)
    @ApiOperation(value = "商品查询接口",notes = "商品查询", response = R2.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R2 queryGoodsList(@RequestBody Map map){

        return goodsService.queryGoodsList(map);
    }



    @PostMapping(value = "/intoShop")
    @ApiOperation(value = "入库接口",notes = "入库接口", response = R2.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R2 intoShop(@RequestBody Map map){

        return goodsService.intoShop(map);
    }





}
